@mixin position($pos: absolute, $top: 0, $left: 0, $w: 100%, $h: 100%) {
  position: $pos;
  top: $top;
  left: $left;
  width: $w;
  height: $h;
}

.modal {
  @include position(fixed);
  z-index: 10000;
  transition: all 0.5s;
  .mask {
    @include position(fixed);
    background-color: #000000;
    opacity: 0.5;
  }
  &.slide-enter-active {
    top: 0;
    opacity: 1;
  }
  &.slide-leave-active {
    top: -50px;
    opacity: 0;
  }
  &.slide-enter {
    top: -50px;
    opacity: 0;
  }
  .modal-dialog {
    @include position(absolute, 40%, 50%, 660px, auto);
    background-color: #ffffff;
    border-radius: 5px;
    transform: translate(-50%, -50%);
    .modal-header {
      display: flex;
      align-items: center;
      height: 60px;
      padding: 0 25px;
      font-size: 16px;
      border-radius: 5px;
      .icon {
        margin-left: auto;
        cursor: pointer;
      }
    }
    .modal-body {
      position: relative;
      min-height: 174px;
      padding: 10px 15px;
      font-size: 14px;
      &::before {
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 90%;
        height: 1px;
        content: '';
        background-color: #ebebeb;
        transform: translate(-50%);
      }
    }
    .modal-footer {
      height: 60px;
      line-height: 60px;
      text-align: center;
    }
  }
}
